<?php
/*
	消息通知设置
	参数：$msgtype,$newsmsg,$tpldata,$uid,$url,$color
*/
defined('BY_JYA') or exit('error');
list($msgtype,$newsmsg,$tpldata,$uid,$url,$color)=$arguments;
$tpl=$this->plugin_setting('message_tpl');
if($msgtype=='cancel'){
	if($tpl['cancel']){
		$template_id=cfc('account')->get_tpl_template_id('OPENTM412375964','排队过号通知');
		cfc('account')->sendTplNotice($uid,$template_id,$tpldata,$url);
		return true;
	}else{
		cfc('account')->sendCustomNotice($newsmsg,$uid);
		return true;
	}
}elseif($msgtype=='quhao'){
	if($tpl['quhao']){
		$template_id=cfc('account')->get_tpl_template_id('OPENTM412244553','取号成功通知');
		cfc('account')->sendTplNotice($uid,$template_id,$tpldata,$url);
		return true;		
	}else{
		cfc('account')->sendCustomNotice($newsmsg,$uid);
		return true;
	}
	
}elseif($msgtype=='notice'){
	if($tpl['notice']){
		cfc('account')->sendTplNotice($uid,$tpl['notice'],$tpldata,$url);	
		return true;
	}else{
		cfc('account')->sendCustomNotice($newsmsg,$uid);
		return true;
	}
	
}